<template>
	<div id="stream">
		<el-scrollbar style="height: 100%;">
			<div>
				流式布局,启用App.vue中的滚动条,在内容超出后会显示滚动条<button @click="count=count===100?10:100">切换</button>
			</div>
			<div class="" v-for="i in count">
				{{i}}
			</div>
		</el-scrollbar>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				count: 10
			}
		},
		created() {

		},
		mounted() {},
		methods: {

		},
		computed: {

		},
		filters: {

		},
		beforeCreate() {
			//启用App.vue滚动条
			document.documentElement.setAttribute('stream', '')
			this.$store.commit('set_needAppScrollbar', true)
		},
		beforeUnmount() {
			//关闭App.vue滚动条
			document.documentElement.removeAttribute('stream')
			this.$store.commit('set_needAppScrollbar', false)
		}
	}
</script>

<style lang="scss">
	
</style>
